import React, { useState } from 'react';
import { PhotoSwipe } from 'react-photoswipe';

export default function () {
  const [isOpen, setIsOpen] = useState(true);

  let items = [
    {
      src: 'http://lorempixel.com/1200/900/sports/1',
      w: 1200,
      h: 900,
      title: 'Image 1'
    },
    {
      src: 'http://lorempixel.com/1200/900/sports/2',
      w: 1200,
      h: 900,
      title: 'Image 2'
    }
  ];

  let options = {
    //http://photoswipe.com/documentation/options.html
  };

  const handleClose = () => {
    setIsOpen(false)
  };

  return <PhotoSwipe isOpen={isOpen} items={items} options={options} onClose={handleClose} />
}